package com.sskj.gsgg.service.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sskj.core.annotation.ControllerLogExeTime;
import com.sskj.gsgg.domain.vo.GsggParam;
import com.sskj.utils.HttpUtils;

@RestController
@RequestMapping("/wechat/gsgg")
public class GongShiGongGaoServiceImpl {
	@Value("${sskj.conf.gsggUrl}")
	private String gsggUrl;
	
	@CrossOrigin(origins = "*", maxAge = 3600)
	@RequestMapping(value = "**/queryGsggMain", method = { RequestMethod.GET })
	@ControllerLogExeTime(description = "获取公示公告main数据")
	public String queryGsggMain() {
		String path="noticeInfo";
		return HttpUtils.returnResult(gsggUrl, path, null);
	}
	
	@CrossOrigin(origins = "*", maxAge = 3600)
	@RequestMapping(value = "**/queryZbggList", method = { RequestMethod.GET })
	@ControllerLogExeTime(description = "招标公告列表")
	public String queryZbggList(GsggParam gsggparam) {
		String path="noticeMore/zbgg";
		return HttpUtils.returnResultPost(gsggUrl, path, gsggparam);
	}
	
	@CrossOrigin(origins = "*", maxAge = 3600)
	@RequestMapping(value = "**/querySgxkList", method = { RequestMethod.GET })
	@ControllerLogExeTime(description = "施工许可证列表")
	public String querySGXKList(GsggParam gsggparam) {
		String path="noticeMore/sgxk";
		return HttpUtils.returnResultPost(gsggUrl, path, gsggparam);
	}
	
	@CrossOrigin(origins = "*", maxAge = 3600)
	@RequestMapping(value = "**/queryDbggList", method = { RequestMethod.GET })
	@ControllerLogExeTime(description = "中标公告列表")
	public String queryDbggList(GsggParam gsggparam) {
		String path="noticeMore/zbtz";
		return HttpUtils.returnResultPost(gsggUrl, path, gsggparam);
	}
	
	@CrossOrigin(origins = "*", maxAge = 3600)
	@RequestMapping(value = "**/queryHtbaList", method = { RequestMethod.GET })
	@ControllerLogExeTime(description = "合同备案列表")
	public String queryHtbaList(GsggParam gsggparam) {
		String path="noticeMore/ht";
		return HttpUtils.returnResultPost(gsggUrl, path, gsggparam);
	}
}
